package com.iot08.common.entity.admin;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @version 1.0
 * @Description: 角色实体
 * @author: Rock
 * @time: 2020/8/20 9:40
 */
@Data
@Document("sys_role")
public class SysRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @Field("_id")
    private String id;

    private String name;

    private String desc;

    //角色级别；0=系统级，1=一级。。。5=五级
    private Integer level;

    @Field("channel_code")
    private Long channelCode;

    /**
     * 角色可访问的菜单列表
     */
    @Field("menu_ids")
    private List<String> menuIds;

    private String creator;

    private Short deleted;

    @Field("create_time")
    private Date createTime;

    @Field("update_time")
    private Date updateTime;

}
